package com.zjzywl.smoke.dispatch;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Service;

import com.zjzywl.smoke.task.TaskManager;

@Service
public class ApplicationStartup implements ApplicationListener<ContextRefreshedEvent> {
	@Autowired
	private TaskManager t;

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		t.startTask();
	}
}
